{% extends "dept_base.html" %}
{% block head %}<title>员工管理系统</title>{% endblock %}
{% block body %}
<div class="container">
    <div style="margin-bottom: 10px">
        <a class="btn btn-success" href="/dept_add/" target="_blank">
            <span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span>
            新建部门
        </a>
    </div>
    <div class="panel panel-default">
            <div class="panel-heading">
                <span class="glyphicon glyphicon-th" aria-hidden="true"></span>
                部门列表
            </div>
            <table class="table table-striped table-hover">
                <thead>
                <tr>
                    <th>部门ID</th>
                    <th>部门名称</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {% for dept in dept_list %}
                <tr>
                    <td>{{ dept.id }}</td>
                    <td>{{ dept.name }}</td>
                    <td>
                        <a class="btn btn-primary btn-xs" href="/dept_update?upd_id={{ dept.id }}">编辑</a>
                        <a class="btn btn-danger btn-xs" href="/dept?del_id={{ dept.id }}">删除</a>
                    </td>
                </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>
</div>

{% endblock %}